import 'package:flutter/material.dart';
import 'package:flutter_day_01/model/User.dart';

class DetailPage extends StatefulWidget {
  DetailPage({Key key, this.user}) : super(key: key);
  final User user;

  @override
  _DetailState createState() => _DetailState();
}

class _DetailState extends State<DetailPage> {
  @override
  Widget build(BuildContext context) {
    print("### " + '${widget.user.name}');
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.blue,
        title: Text('${widget.user.name}'),
      ),
      body: Center(
        child: Column(
          children: [
            Image.network(widget.user.avatarUrl),
            Text("ddd " + '${widget.user.name}'),
            Text('${widget.user.age}')
          ],
        ),
      ),
    );
  }
}
